#include <unordered_map>
#include <memory>
#include <mutex>
#include <iostream>
#include <list>

namespace Kama
{
    #ifndef ARC_NODE_HPP
    #define ARC_NODE_HPP
    template <typename Key, typename Value>
    struct ArcNode
    {
        std::weak_ptr<ArcNode<Key, Value>> m_pre;
        std::shared_ptr<ArcNode<Key, Value>> m_next;
        Key m_key;
        Value m_value;
        int m_access;

        ArcNode(const Key& key, const Value& value) : m_key(key), m_value(value), m_access(1), m_next(nullptr)
        {}

        ArcNode() : m_access(1), m_next(nullptr)
        {}

        Key getKey()
        {
            return m_key;
        }

        Value getValue()
        {
            return m_value;
        }

        void setValue(const Value& value)
        {
            m_value = value;
        }

        int getAccess()
        {
            return m_access;
        }

        void increseAccess()
        {
            ++m_access;
        }

        void resetAccess()
        {
            m_access = 1;
        }
    };
    #endif
}